<template>
  <div>
    <!-- 轮播图 -->
    <Swiper :images="images"></Swiper>
    <!-- nav路由跳转 -->
    <NavigationBar :imgArry="imgArry"></NavigationBar>
    <!-- 砍价列表 -->
    <BargList></BargList>
    <!-- 精选专题 -->
    <Special></Special>
    <!-- 人气推荐 -->
    <Popular></Popular>
    <div style="margin-top:100px">
      <button @click="upDate">更新数据</button>
      <Counter/>
    </div>
  </div>
</template>

<script>
// 混入
import mixin from "../store/store";
import Counter from "../components/Counter";
// 轮播图
import Swiper from "../components/swiper/Swiper";
// 导航切换
import NavigationBar from "../components/navigationBar/NavigationBar";
// 砍价列表
import BargList from "../components/bargaining/BargList";
// 精选专题
import Special from "../components/special/Special";
// 人气推荐
import Popular from "../components/popular/Popular"
export default {
  mixins:[mixin],
  components:{
    Swiper,
    NavigationBar,
    Counter,
    BargList,
    Special,
    Popular,
  },
  data(){
    return{
      images:[
        "https://cdn.it120.cc/apifactory/2018/11/07/76d9a2c2bd56c4ac0497b5d360c6bc06.png",
        "https://cdn.it120.cc/apifactory/2018/11/06/1a6dc56d16dcec64639d9ea624ebdd46.jpg",
        "https://cdn.it120.cc/apifactory/2018/11/07/ad7e06f98e8910ff789b6e577b36c20b.jpg",
      ],
      imgArry:[
        {img:"navIcon/1.png",title:"签到"},
        {img:"navIcon/2.png",title:"礼券"},
        {img:"navIcon/3.png",title:"砍价"},
        {img:"navIcon/4.png",title:"专栏"},
      ],
    }
  },
  mounted(){
    this.$CLIENT.getList().then((res)=>{
      console.log(res)
    }).catch((error)=>{
      console.log(error)
    })
  },
  methods:{
    upDate(){
      this.changeTitle();
    }
  },
  computed:{
    count:function(){
      return this.$store.state.count
    }
  },
  mounted(){
    console.log(this.$store)
  }
}
</script>

<style>

</style>